package com.wanhugou.payment.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.alipay.api.AlipayApiException;
import com.wanhugou.payment.job.AliOrderCheckTask;

@Component
public class ScheduledTesk{
	private static final Logger logger = LoggerFactory.getLogger(ScheduledTesk.class);
	
	@Autowired
	private AliOrderCheckTask aliTesk;
//	
//	@Scheduled(cron="0 0/2 * * * ?") 
//    public void executeAliPayTask() {
//		// 间隔2s
//		try {
//			logger.info("阿里未完成订单定时任务开始执行");
//			aliTesk.execute();
//		} catch (AlipayApiException e) {
//			e.printStackTrace();
//			logger.error("阿里未完成订单定时任务: exception:" + e.getMessage());
//		}
//    }
}
